<?php

namespace lh\method;

use \GatewayWorker\Lib\Gateway;

class Main{
  static function test($id,$msg){

  }

  //随机字符串
  static function randomStr($length){ 
    // 密码字符集，可任意添加你需要的字符 
    $chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
    $password = "";
    for ( $i = 0; $i < $length; $i++ ) {
      $password .= $chars[ mt_rand(0, strlen($chars) - 1) ];
    }
    return $password;
  }
}